Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ICS-26 routing in {Validation, Execution}Context for ChanOpenTry #347

Merged
merged 23 commits into from
Jan 13, 2023

Conversation

plafer
Copy link
Contributor

@plafer plafer commented Jan 11, 2023

Work towards: #322

This implements ICS-26 routing in {Validation, Execution}Context for the ChanOpenTry message only. After this PR is merged, I'll implement the other messages in a similar manner.

Note that we prioritize here a working implementation. We will improve it once a working version is shipped (see #325).


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests.
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Base: 62.23% // Head: 61.01% // Decreases project coverage by -1.22% ⚠️

Coverage data is based on head (74ac474) compared to base (605e7b5).
Patch coverage: 20.67% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
- Coverage   62.23%   61.01%   -1.23%     
==========================================
  Files         124      124              
  Lines       14134    14498     +364     
==========================================
+ Hits         8797     8846      +49     
- Misses       5337     5652     +315     
Impacted Files Coverage Δ
crates/ibc/src/applications/transfer/context.rs 56.66% <0.00%> (-5.59%) ⬇️
crates/ibc/src/core/context.rs 14.53% <0.00%> (-17.20%) ⬇️
...bc/src/core/ics04_channel/handler/chan_open_try.rs 52.91% <0.00%> (-33.30%) ⬇️
crates/ibc/src/core/ics26_routing/context.rs 78.31% <ø> (ø)
crates/ibc/src/core/ics26_routing/error.rs 0.00% <0.00%> (ø)
crates/ibc/src/test_utils.rs 66.52% <0.00%> (-6.66%) ⬇️
crates/ibc/src/mock/context.rs 67.35% <40.14%> (-1.83%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@plafer plafer changed the title Implement ICS-26 routing to {Validation, Execution}Context Implement ICS-26 routing in {Validation, Execution}Context for ChanOpenTry Jan 11, 2023
@plafer plafer marked this pull request as ready for review January 11, 2023 23:07
Copy link
Member

@Farhad-Shabani Farhad-Shabani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @plafer.
I'll probably revisit this PR after getting your response so I can absorb the design. Hope it doesn't cause you any delays.

crates/ibc/src/core/context.rs Show resolved Hide resolved
crates/ibc/src/core/context.rs Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/error.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/handler/chan_open_try.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/handler/chan_open_try.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/context.rs Show resolved Hide resolved
Copy link
Member

@Farhad-Shabani Farhad-Shabani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@plafer plafer merged commit 0067fc0 into main Jan 13, 2023
@plafer plafer deleted the plafer/322-router branch January 13, 2023 15:25
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
…nOpenTry` (#347)

* Add `Router` trait for `ValidationContext`

* Add `lookup_module_by_port()` to new Router

* Add `lookup_module()` in new`Router`

* simplify module_id

* channel router WIP

* validate step

* add immutable route to router

* add on_chan_open_try_validate() cb for ics20

* add on_chan_open_try_validate() to Module

* finish validate for chan_open_try

* chan_open_try_execute

* execute core handler

* Add on_chan_open_try_execute

* ics-20: execute

* execute: emit logs and events

* no ModuleExtras for validate callback

* chan_open_try execute

* update error

* take `channel_id` out of validate()

* chan_open_try_execute

* variable naming

* clippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants